import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';

@Entity('dict_group')
export class DictGroup {
  @PrimaryGeneratedColumn({
    name: 'id',
    type: 'int',
    comment: '主键ID',
  })
  id: number;

  @Column({
    name: 'label',
    type: 'varchar',
    length: 255,
    nullable: false,
    comment: '标题',
  })
  label: string;

  @Column({
    name: 'code',
    type: 'varchar',
    length: 255,
    nullable: false,
    comment: '值',
  })
  code: string;

  @Column({
    name: 'is_disable',
    type: 'tinyint',
    default: 0,
    comment: '是否禁用，1是0否',
  })
  isDisable: number;

  @Column({
    name: 'is_delete',
    type: 'tinyint',
    default: 0,
    comment: '是否删除，1是0否',
  })
  isDelete: number;

  @Column({
    name: 'create_uid',
    type: 'int',
    default: 0,
    comment: '添加用户id',
  })
  createUid: number;

  @Column({
    name: 'update_uid',
    type: 'int',
    default: 0,
    comment: '修改用户id',
  })
  updateUid: number;

  @Column({
    name: 'delete_uid',
    type: 'int',
    default: 0,
    comment: '删除用户id',
  })
  deleteUid: number;

  @Column({
    name: 'create_time',
    type: 'datetime',
    nullable: true,
    comment: '创建时间',
  })
  createTime: Date;

  @Column({
    name: 'update_time',
    type: 'datetime',
    nullable: true,
    comment: '修改时间',
  })
  updateTime: Date;

  @Column({
    name: 'delete_time',
    type: 'datetime',
    nullable: true,
    comment: '删除时间',
  })
  deleteTime: Date;
}